import Mock from 'mockjs';

let system = [{
	key: "/system/login/ap",
	method: "put",
	data: Mock.mock({
		'STATUS': "SUCCESS",
		'DATA': {
			'user': {
				'userId': '@increment(1)',
				'account': "老当益壮",
				'tel|13': /[1-9]/,
			},
			'emp': {
				'name': '@cname()',
				'statu|1': ["NDP","BCH","CHA","WAK","LEV","OUT"]
			},
			'dept': {
				'deptId': '@increment(1)',
				'name': '@cname()',
			},
			'job': {
				'jobId': '@increment(1)',
				'name': '@cname()',
			},
			'roles': [{
				'roleCode': "R1",
				'name': [
					"系统管理员",
				],
				'permissions': "['mm','leave_new','leave_detail','ms','role','role_new','role_detail','role_save','permission','permission_new','permission_detail']",
			},{
				'roleCode': "R2",
				'name': [
					"组织管理员",
				],
				'permissions': "['mm','leave_new','leave_detail','mo','dept','dept_new','dept_info','job_new','job_submit','job_detail','job_save','flow_new','flow_detail','emp','emp_new','emp_info']"
			}],
			'permissionCodeString': "['mm','leave_new','leave_detail','mo','dept','dept_new','dept_info','job_new','job_submit','job_detail','job_save','flow_new','flow_detail','emp','emp_new','emp_info','ms','role','role_new','role_detail','role_save','permission','permission_new','permission_detail']",
			'permissions': [
				{
					code: "mm",
					name: "工作台",
					type: "P",
					path: "/",
					icon: "md-laptop",
					mflg: true,
					sort: 0,
					pCode: '0',
				},
				{
					code: "mo",
					name: "组织管理",
					icon: "md-home",
					type: "M",
					mflg: true,
					sort: 200000,
					pCode: '0',
					permissions: [
						// {
						// 	code: 'dept',
						// 	name: "部门列表",
						// 	path: "/dept",
						// 	type: "P",
						// 	mflg: true,
						// 	pCode: "mo"
						// },
						
						{
							code: 'emp',
							name: "员工列表",
							type: "P",
							path: "/emp",
							mflg: true,
							pCode: "mo"
						},
						
					],
					
				}, 
				
				{
					code: "ms",
					name: "系统管理",
					icon: "md-apps",
					mflg: true,
					type: "M",
					pCode: '0',
					sort: 100000,
					permissions: [
						{
							code: 'role',
							name: "角色列表",
							type: "P",
							path: "/role",
							mflg: true,
							pCode: "ms"
						},
						{
							code: '13',
							name: "权限列表",
							type: "P",
							path: "/permission",
							mflg: true,
							pCode: "ms"
						},
						{
							code: '14',
							name: "字典列表",
							type: "P",
							path: "/dict",
							mflg: true,
							pCode: "ms"
						},
					],
					
				}, 
				
				{
					code: "mst",
					name: "场馆管理",
					icon: "md-outlet",
					mflg: true,
					type: "M",
					pCode: '0',
					sort: 300000,
					permissions: [
						{
							code: 'cglb',
							name: "场馆列表",
							type: "P",
							path: "/cg",
							mflg: true,
							pCode: "mst"
						},
					],
					
				},
				{
					code: "mcl",
					name: "账户管理",
					icon: "ios-paper",
					mflg: true,
					type: "M",
					pCode: '0',
					sort: 400000,
					permissions: [
						{
							code: 'kh',
							name: "客户列表",
							type: "P",
							path: "/client",
							mflg: true,
							pCode: "mcl"
						},
						{
							code: 'zh',
							name: "账户列表",
							type: "P",
							path: "/account",
							mflg: true,
							pCode: "mcl"
						},
						{
							code: 'yj',
							name: "业绩列表",
							type: "P",
							path: "/yj",
							mflg: true,
							pCode: "mcl"
						},
					],
				},
				{
					code: "mtg",
					name: "推广管理",
					icon: "md-timer",
					mflg: true,
					type: "M",
					pCode: '0',
					sort: 500000,
					permissions: [
						{
							code: 'stg',
							name: "推广设置",
							type: "P",
							path: "/stg",
							mflg: true,
							pCode: "mtg"
						},
					],
				},
				{
					code: "msv",
					name: "服务管理",
					icon: "social-rss",
					mflg: true,
					type: "M",
					pCode: '0',
					sort: 600000,
					permissions: [
						{
							code: 'ts',
							name: "测评项目",
							type: "P",
							path: "/ts",
							mflg: true,
							pCode: "msv"
						},
						{
							code: 'tc',
							name: "套餐列表",
							type: "P",
							path: "/tc",
							mflg: true,
							pCode: "msv"
						},
					],
				},
				
			],
		}
	})
}];
export default system;